#ifndef _DOGE_LOG_H_
#define _DOGE_LOG_H_

#ifdef __cplusplus
extern "C" {
#endif

#define LOG_BUF_SIZE    256

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;


#define __FILENAME__ (strrchr(__FILE__, '\\') ? (strrchr(__FILE__, '\\') + 1) : __FILE__)

#define DLOG_COLOR_NULL  0
#define DLOG_RED         1
#define DLOG_GREEN       2
#define DLOG_YELLOW      3
#define DLOG_BLUE        4
typedef uint8_t  log_color_t;

#define DLOG_DEAULT_COLOR     DLOG_BLUE

#define DLOG_USE_SHORT_FILE_NAME        0

void doge_log_init(void);
void d_log_print(log_color_t color, const char *file, int line, const char *func, const char* fmt, ...);
void d_log(const char *file, int line, const char *func, const char* fmt, ...);

#define DLOG_PRINT(...) d_log_print(DLOG_DEAULT_COLOR, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)
#define DLOG(...)  d_log(__FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)

#ifdef __cplusplus
}
#endif
#endif
